class AddGoogleApiKeyToPrograms < ActiveRecord::Migration
  def self.up
    change_table :programs do |t|
	#add default of gmaps api for localhost
	t.string :gmapapi, :default => 'ABQIAAAA3gTQRv5vBcxyNZCSofFHjxTX2XchcwgyHzp4Xo0DHRAzt2aLjhT5z4WqOMUYA0rGg7gTgjNgsEjV_w'
    end
    Program.update_all ["gmapapi = ?", 'ABQIAAAA3gTQRv5vBcxyNZCSofFHjxTX2XchcwgyHzp4Xo0DHRAzt2aLjhT5z4WqOMUYA0rGg7gTgjNgsEjV_w']
  end

  def self.down
    remove_column :programs, :gmapapi
  end
end
